<?php
class Common
{
	private $DF;
	
	function __construct ( $DF )
	{
		$this->DF = $DF;
	}  
	
	function pre ( $_0 = "Nothing to echo." )
	{
		return "<pre>" . $_0 . "</pre>";
	}
	
	function sanitize ( $_0 = NULL )
	{
		return trim ( mysql_real_escape_string ( $_0 ) );
	}
	
	function ifsetor ( &$var, $default = NULL )
	{
		if ( isset ( $var ) )
		{
			$var = $var;
		}
		else
		{
			$var = $default;
		}
			return $var;
	}
	
	function jsRedirect ( $_0 = NULL )
	{
		$url = trim ( $_0 );
		
		if ( !empty ( $url ) )
		{
			echo "<script type='text/javascript'>window.location.href='" . $url . "'</script>";
			
			return TRUE;
		}
		
		return FALSE;
	}
	
}
?>